home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.19981211-19990422
/
000347_news@watsun.cc.columbia.edu _Thu Mar 11 19:07:03 1999.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
4KB
Return-Path: <news@watsun.cc.columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id TAA23645
for <kermit.misc@watsun.cc.columbia.edu>; Thu, 11 Mar 1999 19:07:02 -0500 (EST)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id SAA19689
for kermit.misc@watsun.cc.columbia.edu; Thu, 11 Mar 1999 18:51:09 -0500 (EST)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Subject: Re: C-Kermit Scripting using INPUT and LOG SESSION
Date: 11 Mar 1999 23:51:06 GMT
Organization: Columbia University
Message-ID: <7c9kta$j76$1@newsmaster.cc.columbia.edu>
To: kermit.misc@mailrelay2.cc.columbia.edu
In article <36e84d39.0@amhnt2.amherst.edu>, <jwmanly+news@amherst.edu> wrote:
: Frank da Cruz <fdc@watsun.cc.columbia.edu> wrote:
: : : Why the necessity for the INPUT line? I assume it is to force
: : : C-Kermit to somehow "consume" or "process" the information, but is there
: : : any other, cleaner way to do that?
: :
: : No. You have to think of INPUT as an analog for your eyes and brain. If
: : you were in CONNECT mode, you'd watch the stuff coming in, and eventually
: : you would see something that tells you it's done. No INPUT, no eyes (and
: : no brain :-)
:
: Got it. So how does LOG SESSION fit into this? That is, at what point does
: material coming in get written to the log file -- when it hits the DEVICE
: buffer, or when it gets moved from that buffer to the INPUT buffer?
:
Whenever C-Kermit reads from the device (really, from the device driver's
buffer) while in CONNECT mode or executing an INPUT command, and a session log
is active, it also writes the character to the session log. (There are a
few more wrinkles during CONNECT mode, depending on your SET SESSION-LOG
preferences.)
: : : Final question: notice how I put that "INPUT 10 </html>" command at the
: : : end of the script to flush out whatever other data comes back from the
: : : remote server following the part that I am intersted in? If I don't do
: : : this, when I hit the EXIT at the end of the script (even though it
: : : follows the HANGUP command), I get the "There may still be a connection
: : : open, OK to exit?" message when the script finishes. I assume this is
: : : because there is "unconsumed" data in the buffer.
: :
: : It's because the connection is still open, just like it says. The server
: : closes the connection after all the data it sent has been acknowledged
: : (at the TCP level).
:
: And it's not acknowledged until it has been moved to the INPUT buffer by an
: INPUT command? Got it. This would seem to suggest some usefulness to some
: kind of FLUSH or PAUSE-WHILE-FLUSHING command -- you know, pause for 2
: seconds and discard anything that comes in during that time.
:
PAUSE 2
CLEAR DEVICE
: I've sometimes
: wanted to do that in the middle of a script, and doing a bogus "INPUT 2
: XXXXX" seems a bit kludgy.
Can you think of something that would be less kludgey? "Flush everything
that comes in the next 2 seconds" is totally nondeterministic.
: While we're at it, some TELNET clients have a function (usually bound to a
: key) that does a "send mark and then flush to mark" function -- often called
: abort output. Does Kermit have anything like this that can be used from a
: script?
:
The next release will have a TELOPT command that lets you send any Telnet
protocol command to the Telnet server.
: : : How do I tell Kermit to drop the
: : : connection regardless of whether there is anything left in the buffer or
: : : not, even if data is still streaming in?
: : :
: : Like it says in the book:
:
: : SET EXIT WARNING OFF
:
: Hmmm. So HANGUP just tells the other end to close down, but doesn't actually
: close the connection.
:
A network connection *is* closed by HANGUP.
: There's no straightforward way to tell Kermit to
: tell the other side to close down and wait for some number of seconds to see
: if the TCP connection is actually closed by the remote side?
:
I wouldn't say that. HANGUP does this on a network connection. C-Kermit 7.0
has a CLOSE command ("CLOSE" by itself) that closes the connection. But it
just does what HANGUP does now on a network connection.
- Frank